package com.shycloud.mido.member.controller;

import com.shycloud.mido.common.core.util.R;
import lombok.AllArgsConstructor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
@RequestMapping("/redis")
public class RedisController {


	private final RedisTemplate redisTemplate;

	@PostMapping("getRedisValue")
	public R getRedisValue(String key) {
		return new R(redisTemplate.opsForValue().get(key));
	}
}
